package com.patMall.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public class Commodity {
    private Integer commodityId; // 商品ID

    private String commodityName; // 商品标题

    private String commodityBrand; // 商品品牌

    private BigDecimal commodityPrice; // 商品价格

    private Integer commodityStoreId; // 商店ID

    private String commodityDetails; // 商品详情

    private Integer commodityNumber; // 库存数量

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date commodityTime; // 商品上传时间

    private Integer state;// 0为已售出,1为正在销售,2为已删除

    private int numberOfViews; // 浏览次数

    private List<CommodityImg> commodityImgList; // 商品附图片集合

    private List<Comment> commentList; // 商品评价集合

    private Store store; //商店

    public Commodity() {
    }

    @Override
    public String toString() {
        return "Commodity{" +
                "commodityId=" + commodityId +
                ", commodityName='" + commodityName + '\'' +
                ", commodityBrand='" + commodityBrand + '\'' +
                ", commodityPrice=" + commodityPrice +
                ", commodityStoreId=" + commodityStoreId +
                ", commodityDetails='" + commodityDetails + '\'' +
                ", commodityNumber=" + commodityNumber +
                ", commodityTime=" + commodityTime +
                ", state=" + state +
                ", numberOfViews=" + numberOfViews +
                ", commodityImgList=" + commodityImgList +
                ", commentList=" + commentList +
                ", store=" + store +
                '}';
    }

    public Integer getCommodityId() {
        return commodityId;
    }

    public void setCommodityId(Integer commodityId) {
        this.commodityId = commodityId;
    }

    public String getCommodityName() {
        return commodityName;
    }

    public void setCommodityName(String commodityName) {
        this.commodityName = commodityName;
    }

    public String getCommodityBrand() {
        return commodityBrand;
    }

    public void setCommodityBrand(String commodityBrand) {
        this.commodityBrand = commodityBrand;
    }

    public BigDecimal getCommodityPrice() {
        return commodityPrice;
    }

    public void setCommodityPrice(BigDecimal commodityPrice) {
        this.commodityPrice = commodityPrice;
    }

    public Integer getCommodityStoreId() {
        return commodityStoreId;
    }

    public void setCommodityStoreId(Integer commodityStoreId) {
        this.commodityStoreId = commodityStoreId;
    }

    public String getCommodityDetails() {
        return commodityDetails;
    }

    public void setCommodityDetails(String commodityDetails) {
        this.commodityDetails = commodityDetails;
    }

    public Integer getCommodityNumber() {
        return commodityNumber;
    }

    public void setCommodityNumber(Integer commodityNumber) {
        this.commodityNumber = commodityNumber;
    }

    public Date getCommodityTime() {
        return commodityTime;
    }

    public void setCommodityTime(Date commodityTime) {
        this.commodityTime = commodityTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public int getNumberOfViews() {
        return numberOfViews;
    }

    public void setNumberOfViews(int numberOfViews) {
        this.numberOfViews = numberOfViews;
    }

    public List<CommodityImg> getCommodityImgList() {
        return commodityImgList;
    }

    public void setCommodityImgList(List<CommodityImg> commodityImgList) {
        this.commodityImgList = commodityImgList;
    }

    public List<Comment> getCommentList() {
        return commentList;
    }

    public void setCommentList(List<Comment> commentList) {
        this.commentList = commentList;
    }

    public Store getStore() {
        return store;
    }

    public void setStore(Store store) {
        this.store = store;
    }
}